<%-- 
    Document   : validasi_prestasi
    Created on : Feb 5, 2014, 3:35:40 PM
    Author     : Muhammad Dony
--%>

<%@page import="java.util.List"%>
<%@page import="data.PrestasiData"%>
<%@page import="database.PrestasiDB"%>
<%@include file="../Admin/header_admin.jsp" %>
<script src="res/js/jquery.dataTables.js"></script>
<script src="res/js/bootstrap.dataTables.js"></script>
<link href="res/css/dataTables.css" type="text/css"/>
<style>.pagination{margin:0}</style>
<div class="row">
    <div class="col-lg-6 col-lg-push-1">
        <%
                    List listprestasi = (List) request.getAttribute("listprestasi");
                    int n = 1;                  
                %>
        
        <table id="table" cellpadding="0" cellspacing="0" border="0" class="table table-striped table-bordered">
            <thead>
            <tbody>
            <th>No</th>
            <th>Prestasi</th>
            <th>Kegiatan</th>
            <th>Tingkat</th>
            <th>Tahun</th>
            <th>Status</th>
            </thead>
            <tbody>
                
                <% for (int i = 0; i < listprestasi.size(); i++) {
                        PrestasiData data1 = (PrestasiData) listprestasi.get(i);
                        if (data1.getKategori().equals("1")) {
                        

                %>
                <tr>
                    <td><%=n++%></td>
                    <td><%=data1.getPrestasi()%></td>
                    <td><%=data1.getKegiatan()%></td>
                    <td><%=data1.getTingkat()%></td>
                    <td><%=data1.getTahun()%></td>
                    <% if (data1.getStatus().equals("1")) { %>
                    <td><i class="glyphicon glyphicon-ok"></i> Tervalidasi</td>
                    <% } else if (data1.getStatus().equals("0")) { %>
                    <td><i class="glyphicon glyphicon-warning-sign"></i> Belum Tervalidasi</td>
                    <% } else if(data1.getStatus().equals("x")) { %>
                    <td><i class="glyphicon glyphicon-remove"></i> Tidak Tervalidasi</td>
                    <% } %>
                     <td>
                        <form  action="Validasi_prestasi" role="form" method="POST" parsley-validate>
                            <input type="hidden" name="ID" value="<% out.print(data1.getID()); %>" />
                            <input type="hidden" name="no" value="<% out.print(data1.getNomor()); %>" />
                            <input type="hidden" name="action" value="1" />
                            <input type="submit" class="btn btn-primary" name="action" value="valid">
                        </form>
                    </td> 
                    <td>
                        <form  action="Validasi_prestasi" role="form" method="POST" parsley-validate>
                            <input type="hidden" name="ID" value="<% out.print(data1.getID()); %>" />
                            <input type="hidden" name="no" value="<% out.print(data1.getNomor()); %>" />
                            <input type="hidden" name="action" value="x" />
                            <input type="submit" class="btn btn-danger" name="action" value="tolak">
                        </form>
                    </td>  
                </tr>
                <% }
                        }%>
            </tbody>
        </table>
            
       <table id="table" cellpadding="0" cellspacing="0" border="0" class="table table-striped table-bordered">
            <thead>
            <tbody>
            <th>No</th>
            <th>Prestasi</th>
            <th>Kegiatan</th>
            <th>Tingkat</th>
            <th>Tahun</th>
            <th>Status</th>
            </thead>
            <tbody>
                
                <%  n = 1;
                for (int i = 0; i < listprestasi.size(); i++) {
                        PrestasiData data1 = (PrestasiData) listprestasi.get(i);
                        if (data1.getKategori().equals("2")) {
                        

                %>
                <tr>
                    <td><%=n++%></td>
                    <td><%=data1.getPrestasi()%></td>
                    <td><%=data1.getKegiatan()%></td>
                    <td><%=data1.getTingkat()%></td>
                    <td><%=data1.getTahun()%></td>
                    <% if (data1.getStatus().equals("1")) { %>
                    <td><i class="glyphicon glyphicon-ok"></i> Tervalidasi</td>
                    <% } else if (data1.getStatus().equals("0")) { %>
                    <td><i class="glyphicon glyphicon-warning-sign"></i> Belum Tervalidasi</td>
                    <% } else if(data1.getStatus().equals("x")) { %>
                    <td><i class="glyphicon glyphicon-remove"></i> Tidak Tervalidasi</td>
                    <% } %>
                     <td>
                        <form  action="Validasi_prestasi" role="form" method="POST" parsley-validate>
                            <input type="hidden" name="ID" value="<% out.print(data1.getID()); %>" />
                            <input type="hidden" name="no" value="<% out.print(data1.getNomor()); %>" />
                            <input type="hidden" name="action" value="1" />
                            <input type="submit" class="btn btn-primary" name="action" value="valid">
                        </form>
                    </td> 
                    <td>
                        <form  action="Validasi_prestasi" role="form" method="POST" parsley-validate>
                            <input type="hidden" name="ID" value="<% out.print(data1.getID()); %>" />
                            <input type="hidden" name="no" value="<% out.print(data1.getNomor()); %>" />
                            <input type="hidden" name="action" value="x" />
                            <input type="submit" class="btn btn-danger" name="action" value="tolak">
                        </form>
                    </td>  
                </tr>
                <% }
                        }%>
            </tbody>
        </table>     
    </div>
</div>
<%@include file="../Admin/footer_admin.jsp" %>
